package example.grid.core;

import com.alicloud.openservices.tablestore.core.utils.StringUtils;
import com.alicloud.openservices.tablestore.model.Column;
import com.alicloud.openservices.tablestore.model.ColumnValue;
import com.alicloud.openservices.tablestore.model.CreateTableRequest;
import com.alicloud.openservices.tablestore.model.GetRowRequest;
import com.alicloud.openservices.tablestore.model.PrimaryKey;
import com.alicloud.openservices.tablestore.model.PrimaryKeyBuilder;
import com.alicloud.openservices.tablestore.model.PrimaryKeySchema;
import com.alicloud.openservices.tablestore.model.PrimaryKeyType;
import com.alicloud.openservices.tablestore.model.PrimaryKeyValue;
import com.alicloud.openservices.tablestore.model.PutRowRequest;
import com.alicloud.openservices.tablestore.model.RowPutChange;
import com.alicloud.openservices.tablestore.model.RowUpdateChange;
import com.alicloud.openservices.tablestore.model.SingleRowQueryCriteria;
import com.alicloud.openservices.tablestore.model.TableMeta;
import com.alicloud.openservices.tablestore.model.TableOptions;
import com.alicloud.openservices.tablestore.model.UpdateRowRequest;
import com.alicloud.openservices.tablestore.model.search.SearchQuery;
import com.alicloud.openservices.tablestore.model.search.SearchRequest;
import com.alicloud.openservices.tablestore.model.search.SearchRequest.ColumnsToGet;
import com.alicloud.openservices.tablestore.model.search.query.Query;
import com.aliyun.tablestore.grid.consts.Constants;
import com.aliyun.tablestore.grid.core.RequestBuilder;
import com.aliyun.tablestore.grid.model.GetDataParam;
import com.aliyun.tablestore.grid.model.GridDataSetMeta;
import com.aliyun.tablestore.grid.model.QueryParams;
import com.aliyun.tablestore.grid.model.StoreOptions.StoreType;
import com.aliyun.tablestore.grid.utils.ValueUtil;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map.Entry;

public class MyRequestBuilder extends RequestBuilder {
    public static CreateTableRequest buildCreateDataTableRequest(String tableName) {
        TableMeta meta = new TableMeta(tableName);
        meta.addPrimaryKeyColumn(new PrimaryKeySchema(Constants.GRID_DATA_SET_ID_PK_NAME, PrimaryKeyType.STRING));
        meta.addPrimaryKeyColumn(new PrimaryKeySchema(Constants.VARIABLE_PK_NAME, PrimaryKeyType.STRING));
        meta.addPrimaryKeyColumn(new PrimaryKeySchema(Constants.T_PK_NAME, PrimaryKeyType.STRING));
        meta.addPrimaryKeyColumn(new PrimaryKeySchema(Constants.Z_PK_NAME, PrimaryKeyType.INTEGER));
        return new CreateTableRequest(meta, new TableOptions(-1, 1));
    }
}
